// @ts-ignore
/* eslint-disable */
import { request } from 'umi';

/** 充值记录创建 充值记录创建 POST /api/deposit */
export async function postDeposit(
  params: {
    // path
  },
  body: API.ModelsDepositPost,
  options?: { [key: string]: any },
) {
  const { ...queryParams } = params;
  return request<API.ModelsDepositResponse>('/api/deposit', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    params: { ...queryParams },
    data: body,
    ...(options || {}),
  });
}

/** 充值记录集合获取 充值记录集合获取 GET /api/deposits */
export async function getDeposits(
  params: {
    // query
    pageSize?: number;
    current?: number;
    accountAddress: string;
    // path
  },
  options?: { [key: string]: any },
) {
  const { ...queryParams } = params;
  return request<API.ModelsDepositCollectionResponse>('/api/deposits', {
    method: 'GET',
    params: {
      ...queryParams,
    },
    ...(options || {}),
  });
}
